package com.pm.framework.config;

import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

@Component
public class CustomPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        if(charSequence.toString().contains("userCommentLogin")){//判断是手动登录框架不进行验证直接放行
            return true;
        }else {
            return s.equals(charSequence.toString());
        }

    }
}
